This page shows some results from software that was written to find the minimum and maximum values for a smoothed intra-day time series (the "signal"). The minimums and maximums are marked only after sufficient upward or downward movement.

This experiment was based on the technical trading idea that stocks trade within a band. This is a "reversion to the mean" approach. The idea is that if the stock moves to the edges of the band, or beyond, the stock price will move back toward the center. So buying or shorting the stock when the price moves to the edges will yield a profit.

As discussed on the page Automatically Estimating Parameters for the Simple Moving Average Model, the previous attempt at estimating model parameters was incorrect. In this previous case the signal difference values were mistakenly used. Once I realized that this was the problem I wrote code to find the minimums and maximums of a signal. The graphs below show the MACD Enhanced signal for GS (Goldman Sachs) generated from tick data (as captured from Interactive Brokers) on July 9, 10, 11 and 21, 2008. The signal is plotted with the minimum points.

The average of the lowest N points (where N=4) is calculated to find the bottom of the band. The idea is that if the price falls below this point and then turns around (appears to be heading up), a buy order is generated.







The plot below shows the signal for July 25, 2008 with the "buy" signal point calculated from July 21, 22 and 23, 24. To calculate the buy point the lowest minimums from each day (e.g., 21, 22, 23, 24) are sorted and the median is used as the parameter.